Microprocessor based products may suffer from an electrostatic discharge (ESD) or a power glitch causing a reset of the microprocessor to occur. Such a condition can be caused by exceeding the conventional V.sub.dd /V.sub.ss static protection diodes on device inputs, for example. Such an occurrence is generally undesirable and can disrupt operation of the device. The microprocessor must be reset to restore normal operation of the device.
In printed circuit board products, a conventional technique to reset the microprocessor includes employing a watch-dog timer routine that periodically resets an external resistor/capacitor timer. When the timer expires, a hardware reset is performed. This restores normal microprocessor operation by having the microprocessor return to a known location in the program flow. However, watchdog timer routines are not always effective. Operational states may occur whereby random access memory (RAM) variables are corrupted, resulting in undesirable behavior. However, the watchdog timer has not expired and no hardware reset is generated.
Another method for recovering from an electrostatic discharge induced loss of control is for the microprocessor to detect that a problem exists. In particular, the microprocessor will look for incompatible states of the RAM variables and generate a reset when it detects a problem exists. However, this method requires a predetermination of invalid states that, in practice, would probably be incomplete. That is, it would be difficult to foresee all possible invalid states to determine whether an invalid state exists. Further, this method requires that the microprocessor operate properly when detecting a problem. However, a microprocessor does not always operate properly when an electrostatic discharge occurs.
When restoring a microprocessor after a reset, it may also be beneficial to determine the type of reset which occurred to determine where to return in the flow of the microprocessor program. While this may be done automatically in some microprocessors, certain low end microprocessors do not have this feature. A reset condition can occur generally intentionally or unintentionally. Unintentional resets can result from an undesirable electrostatic discharge or power glitch. Alternatively, an intentional reset can occur by selecting a reset button on the device, by placing the device in a predetermined condition, such as recradling a handset in a cordless telephone, or powering down the device. While it is typically desirable to start the operation of the microprocessor at the beginning of a program after an intentional reset, it may be beneficial to return to predetermined location in the program after an unintentional reset to minimize the disturbance of the operation of the device. In either case, it is beneficial to retain the state information regarding the state of the telephone if the state information is not corrupted. The state information will allow the device to return to the proper location in the microprocessor program.
Accordingly, there is a need for a method to restore normal microprocessor control after a power glitch or electrostatic discharge occurs and minimize interruption of the operation of the microprocessor based device.